package com.niiwoo.activity.stage.enums.invite;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * tjb
 * 流程链接类型 1 投资 2借款
 */
@AllArgsConstructor
@Getter
public enum InviteFlowLinkTypeEnum {

    INVEST(Byte.valueOf("1"), "投资"),
    LOAN(Byte.valueOf("2"), "借款");

    private Byte code;
    private String desc;

    public static InviteFlowLinkTypeEnum valueOf(Byte code) {
        for (InviteFlowLinkTypeEnum yesOrNoEnum : InviteFlowLinkTypeEnum.values()) {
            if (code.byteValue() == yesOrNoEnum.getCode()) {
                return yesOrNoEnum;
            }
        }
        return null;
    }
}

